1. Technical Field of the Invention
This invention relates to computer data structures and algorithms, and more particularly to a binary tree data structure for representing a time-varying function and to algorithms that use the data structure, for applications related to inventory management.
2. Background of the Invention
As applications for computer software get increasingly complex and sophisticated, so does the need for efficiency in performance of the software. An example of complex software is the “enterprise” software being used to model the operation of businesses, such as manufacturers or service providers. The enterprise model often includes time-varying quantities, such as inventory.
Enterprise software typically permits the user to enter queries about time-varying quantities. Sometimes the query might be a simple “function value” type of query, such as, “How many on hand at time t?”. However, a more practical “find” type of query asks for earliest/latest or maximum/minimum information. For example, a query seeking both “earliest” time and “minimum” amount information might ask, “Find the earliest time greater than t at which we will have a minimum of n units of material on hand?”.
One approach to solving queries involving time-varying variables is to represent values of the variable with a “binary tree”. A binary tree is a type of data structure known in the art of algorithms, which arranges data hierarchically. The tree may be queried to obtain data about the variable.
One available enterprise model, at one time manufactured by Optimax Corporation under the trademark OPTIFLEX, used a binary tree to represent a time varying function. At each node, certain values relative to the “subtree” of that node were stored.